combobox: Add workaround so evolution doesn't crash
authorBenjamin Otte <otte@redhat.com>
Mon, 5 May 2014 13:46:23 +0000 (15:46 +0200)
committerBenjamin Otte <otte@redhat.com>
Mon, 5 May 2014 13:53:03 +0000 (15:53 +0200)
Removing the NULL checks in 7f60cab47d9651ed3ed53b86f1f74de71b55eee0
caused evolution to crash. It chains up with NULL and that used to work.

This patch should be reverted for GTK 4.0.

https://bugzilla.gnome.org/show_bug.cgi?id=729496

gtk/gtkcombobox.c

index 557160482ae3b6b3cc09b2209054b0b6545828cd..8176663850e70afc18a5619cd97bd6fbdb1ad5c3 100644 (file)
@@ -5505,6 +5505,11 @@ gtk_combo_box_get_preferred_width (GtkWidget *widget,
   gint                   child_min, child_nat;
   GtkBorder              padding;
   gfloat                 arrow_scaling;
+  gint                   dummy;
+
+  /* https://bugzilla.gnome.org/show_bug.cgi?id=729496 */
+  if (natural_size == NULL)
+    natural_size = &dummy;
 
   child = gtk_bin_get_child (GTK_BIN (widget));